<?php
  
  define('IN_ECS', true);
  
  define(ROOT_PATH, str_replace('news.php', '', str_replace('\\', '/', __FILE__)));
  require_once(ROOT_PATH.'ty/NewsService.php');
  require_once(ROOT_PATH.'ty/TyUtils.php');
  
  $newsService = new NewsService();
  $smarty = TyUtils::getSmarty();
  
  $action  = isset($_REQUEST['act']) ? trim($_REQUEST['act']) : 'news_tl_index';
  
  if($action == 'news_tl_index'){
      
      $newsList = $newsService->getNewsShowToIndexGroupCat();
      $smarty->assign('news_list', $newsList);
      $content = $smarty->fetch('index/news_title_list.inc');
      //$content = $newsService->getNewsContentHtml($newsList);
     // $content = str_replace('"', '\'', $content);
     // $content =  iconv('gb2312', 'utf-8', $content);
      exit($content);
  }
  
  
?>
